package com.atguigu.day15.homework.h2;

import static com.atguigu.day15.homework.h2.Data.EQUIPMENTS;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/19 9:15
 * @注释
 */
public class Test {
    public static void main(String[] args) {
        Equipment[] eArr = new Equipment[EQUIPMENTS.length];
        for(int i = 0; i < eArr.length; i++){
            int id = Integer.parseInt(EQUIPMENTS[i][0]);
            String brand = EQUIPMENTS[i][1];
            double price = Double .parseDouble(EQUIPMENTS[i][2]);
            String devicename = EQUIPMENTS[i][3];
            int state = Integer.parseInt(EQUIPMENTS[i][4]);
            Status status = Status.getByValue(state);
            eArr[i] = new Equipment(id,brand,price,devicename,status);
            System.out.println(eArr[i]);
        }
    }
}
